#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
int main()
{
	int i, j;
	int m, n;
	scanf("%d %d", &m, &n);
	int p = m;
	int sum = 2;
	for (i = 0; i < n-1; i++)
	{
		
			m = m * 10 + p;
		
		sum = sum + m;
	}
	printf("%d", sum);
	return 0;
}